<?php

/**
 * Description of ContentAdmin
 *
 * @author Honza
 */
class ContentAdmin implements IMainBodyWithSubMenu {

  public function getContent() {
    $auth = Auth::getInstance();
    if ($auth->hasAuthority(ROLE_ADMIN)) {
      return NavigationAdmin::getContent();
    } else {
      return ACCESS_DENIED;
    }
  }

  public function getSubNavigation() {
    $auth = Auth::getInstance();
    if ($auth->hasAuthority(ROLE_ADMIN)) {
      $submenu .= '<a href="index.php?where=admin&subwhere=authors">Authors</a> | ';
      $submenu .= '<a href="index.php?where=admin&subwhere=genres">Genres</a> | ';
      $submenu .= '<a href="index.php?where=admin&subwhere=langs">Languages</a> | ';
      $submenu .= '<a href="index.php?where=admin&subwhere=users">Users</a> | ';
      $submenu .= '<a href="index.php?where=admin&subwhere=locations">Locations</a>';
      return $submenu;
    }
  }

}

?>
